﻿<!DOCTYPE html>

<html class="x-admin-sm">
<head>
    <meta name="viewport" content="width=device-width" />
    <meta charset="UTF-8">
    <title>生产计划</title>
    <meta name="renderer" content=padding>
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link href="~/js/layui/css/layui.css" rel="stylesheet" />
    <link href="~/X-admin/css/font.css" rel="stylesheet" />
    <script src="~/X-admin/lib/layui/layui.js"></script>
    <link href="~/X-admin/css/xadmin.css" rel="stylesheet" />
    <script src="~/X-admin/js/jquery.min.js"></script>
    <script src="~/X-admin/js/xadmin.js"></script>
</head>
<body>
    <div class="layui-fluid" style="width:100%;">
        <div id="bDiv">
        </div>
        <div style="float:left;width:100%;">
            <div class="layui-card">

                <div class="layui-card-body layui-table-body layui-table-main" id="layui-table-main">
                    <table class="layui-hide" id="list" lay-filter="list"></table>
                </div>
            </div>
            <form id="qForm">
               <input type="hidden" name="plCode" id="plCode" />
                <input type="hidden" name="dType" id="dType" />
            </form>

        </div>
    </div>
</body>
</html>
<script src="~/js/framework/sysframework.js"></script>
<script src="~/js/framework/commonjs.js"></script>

<script>
    var plCode = "",dType="";

    $(function () {
        plCode = getUrlVariable("plCode");
        dType = getUrlVariable("dType");
        $("input[ name='plCode']").val(plCode);
        $("input[ name='dType']").val(dType);
        getTableCloums(dType);
        loadData();
    })

    var dUrl = "../Summary/getDataList?dataType=pcd&condition=";
    /**
     * 加载数据
     * **/
    function loadData() {
        layui.use('table', function () {
            var conditon = JSON.stringify(FormToJson("qForm"));

            var table = layui.table;
            table.render({
                elem: '#list'
                , cols: eval(tCloumns)
                , done: function (res, curr, count) {
                    // $("[data-field='id']").css('display', 'none');//隐藏列
                    currPage = curr;

                }
                , url: dUrl + conditon
                , skin: 'row' //表格风格
                , even: true
                , page: true //是否显示分页
                , limits: [20, 25, 30]
                , limit: 20 //每页默认显示的数量
                , id: "list"
            });


        });

    }

 


</script>
